// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_SUPPLIER_ATTACHED
// * CreateDate    : 2013-08-28 11:00:56
// * Creater       : CodeSmith
// * LastChangeDate: 2013-08-28 11:00:56
// * LastChanger   : 2013-08-28 11:00:56
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Suzsoft.Smart.Data;
using ESOL.Common.Entity;

namespace ESOL.Business.Mst
{
/// <summary>
    /// MstSupplierAttached
    /// </summary>
    public partial class MstSupplierAttachedBs
    {
        #region GetByID
        /// <summary>
        /// Get Entity
        /// </summary>
        /// <param name="objMstSupplierAttachedEntity">Entity</param>
        /// <returns>Entity</returns>
        public static MstSupplierAttachedEntity GetMstSupplierAttached(MstSupplierAttachedEntity objMstSupplierAttachedEntity)
        {
            return DataAccess.SelectSingle<MstSupplierAttachedEntity>(objMstSupplierAttachedEntity);
        }
        #endregion


        #region Insert
        /// <summary>
        /// Insert Data
        /// </summary>
        /// <param name="objMstSupplierAttachedEntity">Entity</param>
        /// <returns>true Insert Succeed; false Insert Fail</returns>
        public static bool InsertMstSupplierAttached(MstSupplierAttachedEntity objMstSupplierAttachedEntity)
        {
            return DataAccess.Insert(objMstSupplierAttachedEntity);
        }

        public static bool InsertMstSupplierAttached(List<MstSupplierAttachedEntity> objMstSupplierAttachedEntityList)
        {
            return DataAccess.Insert(objMstSupplierAttachedEntityList);
        }
        #endregion


        #region Update
        /// <summary>
        /// Update Data
        /// </summary>
        /// <param name="objMstSupplierAttachedEntity">Entity</param>
        /// <returns>true Update Succeed; false Update Fail</returns>
        public static bool UpdateMstSupplierAttached(MstSupplierAttachedEntity objMstSupplierAttachedEntity)
        {
            return DataAccess.Update(objMstSupplierAttachedEntity);
        }

        public static bool UpdateMstSupplierAttached(List<MstSupplierAttachedEntity> objMstSupplierAttachedEntityList)
        {
            return DataAccess.Update<MstSupplierAttachedEntity>(objMstSupplierAttachedEntityList);
        }
        #endregion


        #region Delete
        /// <summary>
        /// Delete Data
        /// </summary>
        /// <param name="objMstSupplierAttachedEntity">Entity</param>
        /// <returns>true Delete Succeed; false Delete Fail</returns>
        public static bool DeleteMstSupplierAttached(MstSupplierAttachedEntity objMstSupplierAttachedEntity)
        {
            return DataAccess.Delete(objMstSupplierAttachedEntity);
        }

        public static bool DeleteMstSupplierAttached(List<MstSupplierAttachedEntity> objMstSupplierAttachedEntityList)
        {
            return DataAccess.Delete<MstSupplierAttachedEntity>(objMstSupplierAttachedEntityList);
        }
        #endregion


        #region GetAll
        /// <summary>
        /// Get All Data
        /// </summary>
        /// <returns>Back All Data<returns>
        public static DataSet GetMstSupplierAttachedAll()
        {
            return DataAccess.SelectAllDataSet<MstSupplierAttachedEntity>();
        }
        /// <summary>
        /// Get All Data List
        /// </summary>
        /// <returns>Back All Data List<returns>
        public static List<MstSupplierAttachedEntity> GetMstSupplierAttachedAllList()
        {
            return DataAccess.SelectAll<MstSupplierAttachedEntity>();
        }
        #endregion

        public static List<MstSupplierAttachedEntity> GetSupplierAttachedAllListBySuppId(string suppId)
        {
            if (string.IsNullOrEmpty(suppId))
                return null;
            return DataAccess.Select<MstSupplierAttachedEntity>(new MstSupplierAttachedEntity { SupplierId = suppId });
        }

	}
	
	
}	

